<div class="{% if error %}{{ field.error_class }}{% endif %}">
    <label class="form-check form-switch">
        <input id="{{ field.id }}" name="{{ field.id }}" class="field-boolean form-check-input"
               type="checkbox" {{ 'checked' if data else '' }} {{ field.input_params() | safe }} />
        {% if field.help_text %}
            <span class="form-check-label">{{ field.help_text }}</span>
        {% endif %}
    </label>
</div>
{% include "forms/_error.html" %}
